﻿using GameCreator.Characters;
using UnityEngine;

namespace Gp.Scripts.Character {
    public class NpcSpriteCharacter : NpcBaseCharacter {

        private void Reset() {
            // 角色永远面向摄像机
            characterLocomotion.faceDirection = CharacterLocomotion.FACE_DIRECTION.CameraDirection;
        }


        // UPDATE: --------------------------------------------------------------------------------
        protected override void Update() {
            if (!Application.isPlaying) return;

            // 角色永远面向摄像机
            characterLocomotion.faceDirection = CharacterLocomotion.FACE_DIRECTION.CameraDirection;

            if (!IsControllable()) {
                direction = Vector3.zero;
            }


            CharacterUpdate();
        }

    }
}